<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8">

    <title>商品详情</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

    <link rel="shortcut icon" href="favicon.ico">

    <link rel="stylesheet" href="/Public/Home/css/grid.css">
    <link rel="stylesheet" href="/Public/Home/css/style.css">
    <link rel="stylesheet" href="/Public/Home/css/normalize.css">

    <script src="/Public/Home/js/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="Public/Home/js/jquery-1.8.3.min.js"><\/script>')</script>
    <script src="/Public/Home/js/html5.js"></script>
    <script src="/Public/Home/js/main.js"></script>
    <script src="/Public/Home/js/radio.js"></script>
    <script src="/Public/Home/js/checkbox.js"></script>
    <script src="/Public/Home/js/selectBox.js"></script>
    <script src="/Public/Home/js/jquery.carouFredSel-5.2.2-packed.js"></script>
    <script src="/Public/Home/js/jquery.jqzoom-core.js"></script>
    <script src="/Public/Home/js/jquery.transit.js"></script>
    <script src="/Public/Home/js/jquery.easing.1.2.js"></script>
    <script src="/Public/Home/js/jquery.anythingslider.js"></script>
    <script src="/Public/Home/js/jquery.anythingslider.fx.js"></script>
</head>
<body>
    <div id="top">
        <div class="container_12">
            <div class="grid_3">
                <div class="lang">
                    <ul>
                        <li class="current"><a href="#">EN</a></li>
                        <li><a href="#">FR</a></li>
                        <li><a href="#">GM</a></li>
                    </ul>
                </div><!-- .lang -->

                <div class="currency">
                    <ul>
                        <li class="current"><a href="#">$</a></li>
                        <li><a href="#">&#8364;</a></li>
                        <li><a href="#">&#163;</a></li>
                    </ul>
                </div><!-- .currency -->
            </div><!-- .grid_3 -->

            <div class="grid_9">
                <nav>
                    <ul>
                        <li class="current"><img src="<?php echo (session('img')); ?>" width="30px" height="30px" alt=""><a href="#"><?php echo (session('email')); ?></a>
                        </li>
                        <li><a href="#">我的收藏</a></li>
                        <li><a href="<?php echo U('User/login');?>">登录</a></li>
                        <li><a href="<?php echo U('User/register');?>">注册</a></li>
                        <li><a href="<?php echo U('User/logout');?>">退出</a></li>
                    </ul>
                </nav>
            </div><!-- .grid_9 -->
        </div>
    </div><!-- #top -->

    <header>
        <div class="container_12">
            <div class="grid_3">
                <hgroup>
                    <h1 id="site_logo"><a href="index.html" title=""><img src="/Public/Home/img/logo.png" alt="Online Store Theme Logo"></a></h1>
                    <h2 id="site_description">商店主题</h2>
                </hgroup>
            </div><!-- .grid_3 -->

            <div class="grid_9">
                <div class="top_header">
                    <div class="welcome">
                        <li><img src="/Public/Home/img/content/leidian.gif" width="350px" height="45px" alt=""></li>
                    </div><!-- .welcome -->

                    <ul id="cart_nav">
                        <li>
                            <a class="cart_li" href="#">
                                <div class="cart_ico"></div>
                                购物车
                                <span>$0.00</span>
                            </a>
                            <ul class="cart_cont">
                                <li class="no_border recently">最近添加的项目</li>
                                <li>
                                    <a href="product_page.html" class="prev_cart"><div class="cart_vert"><img src="/Public/Home/img/content/cart_img.png" alt="Product 1" title=""></div></a>
                                    <div class="cont_cart">
                                        <h4>香味散发器 <br>栀子花</h4>
                                        <div class="price">1 x <span>$399.00</span></div>
                                    </div>
                                    <a title="close" class="close" href="#"></a>
                                    <div class="clear"></div>
                                </li>

                                <li>
                                    <a href="product_page.html" class="prev_cart"><div class="cart_vert"><img src="/Public/Home/img/content/cart_img2.png" alt="Product 2" title=""></div></a>
                                    <div class="cont_cart">
                                        <h4>Caldrea Linen and Room Spray</h4>
                                        <div class="price">1 x <span>$123.00</span></div>
                                    </div>
                                    <a title="close" class="close" href="#"></a>
                                    <div class="clear"></div>
                                </li>
                                <li class="no_border">
                                    <a href="shopping_cart.html" class="view_cart">查看购物车</a>
                                    <a href="checkout.html" class="checkout">去结账</a>
                                </li>
                            </ul>
                        </li>
                    </ul><!-- .cart_nav -->

                    <form class="search">
                        <input type="submit" class="search_button" value="">
                        <input type="text" name="search" class="search_form" value="" placeholder="输入您要找的商品...">
                    </form><!-- .search -->
                </div><!-- .top_header -->

                <nav class="primary">
                    <ul>
                        <li class="curent"><a href="<?php echo U('Index/index');?>">首页</a></li>
                        <li class="parent">
                            <a href="<?php echo U('Cate/catalog_grid',array('fid'=>1));?>">珠宝</a>
                            <ul class="sub">
                                <li><a href="<?php echo U('Cate/catalog_grid',array('fid'=>4));?>">黄金</a></li>
                                <li><a href="<?php echo U('Cate/catalog_grid',array('fid'=>5));?>">珍珠</a></li>
                                <li><a href="<?php echo U('Cate/catalog_grid',array('fid'=>6));?>">钻石</a></li>
                            </ul>
                        </li>
                        <li class="parent">
                            <a href="<?php echo U('Cate/catalog_grid',array('fid'=>2));?>">眼镜</a>
                            <ul class="sub">
                                <li><a href="<?php echo U('Cate/catalog_grid',array('fid'=>7));?>">太阳镜</a></li>
                                <li><a href="<?php echo U('Cate/catalog_grid',array('fid'=>8));?>">运动镜</a></li>
                                <li><a href="<?php echo U('Cate/catalog_grid',array('fid'=>9));?>">无框眼镜</a></li>
                            </ul>
                        </li>
                        <li class="parent">
                            <a href="<?php echo U('Cate/catalog_grid',array('fid'=>3));?>">手表</a>
                            <ul class="sub">
                                <li><a href="<?php echo U('Cate/catalog_grid',array('fid'=>10));?>">机械表</a></li>
                                <li><a href="<?php echo U('Cate/catalog_grid',array('fid'=>11));?>">电子表</a></li>
                                <li><a href="<?php echo U('Cate/catalog_grid',array('fid'=>12));?>">潜水表</a></li>
                            </ul>
                        </li>
                        <li class="parent">
                            <a href="#">查看更多</a>
                            <ul class="sub">
                                <li><a href="index.html">首页</a></li>
                                <li><a href="typography_page.html">版式和基本样式</a></li>
                                <li><a href="catalog_grid.html">目录(网格视图)</a></li>
                                <li><a href="catalog_list.html">目录(列表类型视图)</a></li>
                                <li><a href="product_page.html">产品视图</a></li>
                                <li><a href="shopping_cart.html">购物车</a></li>
                                <li><a href="checkout.html">进行结算</a></li>
                                <li><a href="compare.html">产品比较</a></li>
                                <li><a href="login.html">登录</a></li>
                                <li><a href="contact_us.html">联系我们</a></li>
                                <li><a href="404.html">404</a></li>
                                <li><a href="blog.html">博客文章</a></li>
                                <li><a href="blog_post.html">博客文章评论</a></li>
                            </ul>
                        </li>
                    </ul>
                </nav><!-- .primary -->
            </div><!-- .grid_9 -->
        </div>
    </header>

    
    
    
    <div class="breadcrumbs">
        <div class="container_12">
            <div class="grid_12">
                 <a href="index.html">首页</a><span></span><a href="#">产品类别</a><span></span><span class="current">详情</span>
            </div><!-- .grid_12 -->
        </div><!-- .container_12 -->
    </div><!-- .breadcrumbs -->
    <section id="main">
        <div class="container_12">
            <form action="<?php echo U('Shopcart/index');?>">
                <div id="content" class="grid_12">
                    <header>
                        <h1 class="page_title"><?php echo ($shop["title"]); ?></h1>
                    </header>
                            
                    <article class="product_page">
                        <div class="grid_5 img_slid" id="products">
                            <img class="sale" src="/Public/Home/img/sale.png" alt="Sale">
                            <div class="preview slides_container">
                                <div class="prev_bg">
                                        <img  class="img3" src="<?php echo ($shop["img"]); ?>" alt="Product 1" width="380" height="380" title=""> 
                                </div>
                            </div><!-- .preview -->

                            <div class="next_prev">
                                <a id="img_prev" class="arows" href="#"><span>Prev</span></a>
                                <a id="img_next" class="arows" href="#"><span>Next</span></a>
                            </div><!-- .next_prev -->
                            
                            <ul class="small_img clearfix" id="thumblist">
                                <?php if(is_array($img)): foreach($img as $key=>$vo): ?><li><a href="javascript:void(0)" title=""><img class="img2" src='<?php echo ($vo); ?>' alt=""></a></li><?php endforeach; endif; ?>
                            </ul>

                            <div id="pagination"></div>
                        </div><!-- .grid_5 -->

                        <div class="grid_7">
                            <div class="entry_content">
                                <div class="soc">
                                    <img src="/Public/Home/img/soc.png" alt="Soc">
                                </div><!-- .soc -->

                                <div class="review">
                                    <a class="plus" href="#"></a>
                                    <a class="plus" href="#"></a>
                                    <a class="plus" href="#"></a>
                                    <a href="#"></a>
                                    <a href="#"></a>
                                    <span><strong>3</strong> 评论</span>
                                    <span class="separator">|</span>
                                    <a class="add_review" href="#">发表评论</a>
                                </div>

                                <h3><?php echo ($shop["title"]); ?></h3>
                                <h4><small><?php echo ($shop["des"]); ?></small></h4>

                                <div class="ava_price">
                                    
                                    <div class="price">
                                     <h3>价格:</h3><span id="totalPrice" class="pri"><?php echo ($shop["price"]); ?></span>
                                    </div><!-- .price -->
                                    <input type="hidden" value="<?php echo ($shop["price"]); ?>" id="price" />

                                    <div class="clear"></div>
                                    <dt class="tb-property-type">数量</dt>
                                    <dd>
                                        <input type="button" class="opt" id="del" value="-"/>
                                        <input type="text" id="res" value="1"/>
                                        <input type="button" class="opt" id="add" value="+"/>
                                        <em>(库存<span id="J_SpanStock" class="tb-count">199</span>件)</em>
                                    </dd>
                                   <!--  <div class="availability_sku">
                                        <div class="availability">
                                        Availability: <span>In stock</span>
                                        </div>
                                        <div class="sku">
                                        SKU: <span>Candles OV</span>
                                        </div>
                                    </div> --><!-- .availability_sku -->

                                    

                                </div><!-- .ava_price -->




                                <div class="parameter_selection">
                                    <?php if(is_array($attr)): foreach($attr as $key=>$v): echo ($v["kname"]); ?>
                                        <select id="option" class="select"> 
                                            <?php if(is_array($v["val"])): foreach($v["val"] as $key=>$vv): ?><option value="<?php echo ($vv["id"]); ?>"><?php echo ($vv["vname"]); ?></option><?php endforeach; endif; ?>
                                        </select><?php endforeach; endif; ?>
                                </div><!-- .parameter_selection -->

                                <div class="cart">
                                    <a href="<?php echo U('Shopcart/index');?>" class="bay"><img src="/Public/Home/img/bg_cart.png" alt="Buy" title="">加入购物车</a>
                                    <a href="#" class="like"><img src="/Public/Home/img/like.png" alt="" title=""> 加入收藏</a>
                                    <a href="#" class="obn"><img src="/Public/Home/img/obl.png" alt="" title="">加入比较</a>
                                </div><!-- .cart -->

                            </div><!-- .entry_content -->
                        </div><!-- .grid_7 -->
          <div class="clear"></div>
                     
                    </article><!-- .product_page -->
                    
                        <div class="clear"></div>

                </div><!-- .grid_12 -->
            </form>
        </div><!-- .container_12 -->
    </section><!-- #main -->
    <div class="clear"></div>


    <footer>
        <div class="footer_navigation">
            <div class="container_12">
                <div class="grid_3">
                     <h3>联系我们</h3>
                    <ul class="f_contact">
                        <li>49 Archdale, 2B Charlestone</li>
                        <li>+777 (100) 1234</li>
                        <li>mail@example.com</li>
                    </ul><!-- .f_contact -->
                </div><!-- .grid_3 -->

                <div class="grid_3">
                    <h3>信息</h3>
                    <nav class="f_menu">
                        <ul>
                            <li><a href="#">关于我们</a></li>
                            <li><a href="#">隐私政策</a></li>
                            <li><a href="#">条款和条件</a></li>
                            <li><a href="#">安全付款</a></li>
                        </ul>
                    </nav><!-- .private -->
                </div><!-- .grid_3 -->

                <div class="grid_3">
                    <h3>客户服务</h3>
                    <nav class="f_menu">
                        <ul>
                            <li><a href="#">联系方式</a></li>
                            <li><a href="#">返回</a></li>
                            <li><a href="#">常见问题</a></li>
                            <li><a href="#">网站地图</a></li>
                        </ul>
                    </nav><!-- .private -->
                </div><!-- .grid_3 -->

                <div class="grid_3">
                    <h3>我的账户</h3>
                    <nav class="f_menu">
                        <ul>
                            <li><a href="#">我的账户</a></li>
                            <li><a href="#">订单历史</a></li>
                            <li><a href="#">愿望清单</a></li>
                            <li><a href="#">实时通讯</a></li>
                        </ul>
                    </nav><!-- .private -->
                </div><!-- .grid_3 -->
                
                <div class="grid_12 newsletter-payments">
                    <div class="newsletter">
                        <div class="icon-mail">通讯</div>
                        <p>订阅有关我们商店折扣的通知</p>
                        <form>
                            <input type="submit" value="">
                            <input type="email" name="newsletter" value="" placeholder="输入您的邮箱地址...">
                        </form>                    
                    </div><!-- .newsletter -->
                    
                    <div class="payments">
                        <img src="/Public/Home/img/payments.png" alt="Payments">
                    </div><!-- .payments -->
                </div><!-- .grid_12.newsletter-payments -->

                <div class="clear"></div>
            </div><!-- .container_12 -->
        </div><!-- .footer_navigation -->

        <div class="footer_info">
            <div class="container_12">
                <div class="grid_6">
                    <p class="copyright">© 钻石店主题, 2013.更多 <a href="http://www.baidu.com/" target="_blank" title="模板之家">爱奇艺视频</a> - 从 <a href="http://www.baidu.com/" title="网页模板" target="_blank">爱奇艺VIP</a>收藏</p>
                </div><!-- .grid_6 -->

                <div class="grid_6">
                    <div class="soc">
                        <a class="google" href="#"></a>
                        <a class="twitter" href="#"></a>
                        <a class="facebook" href="#"></a>
                    </div><!-- .soc -->
                </div><!-- .grid_6 -->

                <div class="clear"></div>
            </div><!-- .container_12 -->
        </div><!-- .footer_info -->
    </footer>
    
    <script>
        $(function(){
            $(".img2").click(function(){
                var a=$(this).attr("src");
                $(".img3").attr("src",a);
            });

            $('#del').click(function(){
                var v=$('#res').val();
                var p=$('#price').val();
                 console.log(v);
                 console.log(p);
                if(v==1){
                    $('#res').val(1);
                    $("#totalPrice").html(v*p);
                }else{
                    v--;
                    $('#res').val(v);
                    $("#totalPrice").html(v*p);
                }
            });
            $('#add').click(function(){
                var v=$('#res').val();
                var p=$('#price').val();
                console.log(v);
                console.log(p);
                if(v==199){
                    $('#res').val(199);
                }else{
                    v++;
                    $('#res').val(v);
                    $("#totalPrice").html(v*p);
                }
            });

            $("#res").keyup(function(){
                var v=$('#res').val();
                var p=$('#price').val();
                    if(isNaN($(this).val())||parseInt($(this).val())<1){
                    $(this).val("1");
                    $("#totalPrice").html($("#price").val());
                    return;
                    }
                  
                if(v==0||null||v>=200){
                    v=$('#res').val(1);
                    $("#totalPrice").html(p);
                }else{
                    var total=parseFloat($("#price").val())*parseInt($(this).val());
                    $("#totalPrice").html(v*p);
                }
                  
              
            })
              

            $("select").change(function(){
                var arr = new Array();
                var sid = "<?php echo ($shop["id"]); ?>";
                $.each($("select"),function(i,n){
                    arr.push($(n).val());
                });
                arr.sort(function(a,b){
                    return b-a;
                });

                $.ajax({
                  url: "<?php echo U('price');?>",
                  type:"POST",
                  data:{sid:sid,attrvid:arr},
                  success: function(html){
                     $('.pri').html(html.data);
                  }
                });
                console.log(arr);
                // $.post("<?php echo U('price');?>",{sid:sid,attrvid:arr},
                // function(msg){
                //     alert(111);
                //     $('.pri').html(msg.data.price);
                   
                // });
            });
        });
    </script>

</body>
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
</html>